home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 26 / AACD 26.iso / AACD / Programming / ace_gpl_release / src / lib / c / sleep.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-10-04  |  1.0 KB  |  40 lines

  1. /*
  2. ** db.lib module
  3. **
  4. ** SLEEP FOR <seconds>
  5. ** Copyright (C) 1998 David Benn
  6. ** 
  7. ** This program is free software; you can redistribute it and/or
  8. ** modify it under the terms of the GNU General Public License
  9. ** as published by the Free Software Foundation; either version 2
  10. ** of the License, or (at your option) any later version.
  11. **
  12. ** This program is distributed in the hope that it will be useful,
  13. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. ** GNU General Public License for more details.
  16. **
  17. ** You should have received a copy of the GNU General Public License
  18. ** along with this program; if not, write to the Free Software
  19. ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  20. **
  21. ** Author: David J Benn
  22. **   Date: 14th,15th May 1994
  23. */
  24.  
  25. #include <exec/types.h>
  26. #include <libraries/mathffp.h>
  27.  
  28. void    sleep_for_secs(seconds)
  29. float    seconds;
  30. {
  31. LONG    ticks;
  32.  
  33.     ticks = SPFix(SPMul(seconds,50.0));
  34.  
  35.     if (ticks <= 0) 
  36.         return;
  37.     else
  38.         Delay(ticks);
  39. }
  40.